using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ERPBackend.Models
{
    public class ProductionStockInItem : BaseModel
    {
        public int ProductionStockInId { get; set; }

        [ForeignKey("ProductionStockInId")]
        public virtual ProductionStockIn ProductionStockIn { get; set; }

        public int? ProductionOrderItemId { get; set; }

        // [ForeignKey("ProductionOrderItemId")]
        // public virtual ProductionOrderItem ProductionOrderItem { get; set; }

        public int MaterialId { get; set; }

        [ForeignKey("MaterialId")]
        public virtual Material Material { get; set; }

        [Required]
        [MaxLength(255)]
        public string ProductName { get; set; }

        [MaxLength(255)]
        public string Specification { get; set; }

        [MaxLength(50)]
        public string Unit { get; set; }

        [Column(TypeName = "decimal(18,4)")]
        public decimal OrderQuantity { get; set; }

        [Column(TypeName = "decimal(18,4)")]
        public decimal StockInQuantity { get; set; }

        [MaxLength(50)]
        public string BatchNo { get; set; }

        public DateTime? ProductionDate { get; set; }

        public DateTime? ExpiryDate { get; set; }

        public string Remark { get; set; }
    }
}